﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;

namespace StockFinder.Network
{
    public class ProxiedWebClient : WebClient
    {
        public ProxiedWebClient()
        {
            //hack: is this work machine? behind proxy
            if (Environment.MachineName != "ELONW127199") return;

            var proxyObject = new WebProxy("webproxy.emea.bankofamerica.com", 8080)
                                  {
                                      Credentials = new NetworkCredential("nbkdk9t", "a4a4a4a4", "emea")
                                  };
            Proxy = proxyObject;
            Credentials = new NetworkCredential("nbkdk9t", "a4a4a4a4", "emea");
        }
    }
}
